<template>
  <div>
    <el-row :gutter="10">
      <el-col :xs="8" :sm="8" :md="6" :lg="6" :xl="4" v-for="(item,i) in Newdatalist" :key="i">
        <div class="grid-content bg-purple isshouye">
          <router-link to='/comment'><img :src="item.img" alt="" srcset="" @click="ispl(item.id)"></router-link>
          
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  data() {
    return {
      dataList: "",
      page: 0
    };
  },
  created() {
    this.$store.dispatch("getdata");
  },
  computed:{
    Newdatalist(){
      return this.$store.state.data
    }
  },
  mounted() {
    this.dataList = this.$store.state.data;
    console.log(this.dataList)
  },
  methods: {
    ispl(isid){
      console.log(isid);
      return this.$store.commit('getdiscuss',isid)
    },
    dianji(data){
      console.log(data)
    }
   /*  load(){
      return location.reload()
    } */
  },
/*   watch:{
    ispl(isid){
      console.log(isid);
      return this.$store.commit('getdiscuss',isid)
    }
  } */

};
</script>

<style >
.el-col {
  border-radius: 4px;
  min-height: 56px;
}
.bg-purple-dark {
  background: #99a9bf;
}

.bg-purple-light {
  background: #e5e9f2;
}
.grid-content {
  border-radius: 4px;

}
.el-row .isshouye{
  margin-bottom: 20px;
  min-height: 100px;
}
.isshouye img{
  width:100%
}
</style>
